﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using WebApplication1.Models;

namespace WebApplication1.Controllers
{
    /// <summary>
    /// 默认模块
    /// </summary>
    public class DefaultController : Controller
    {

        /// <summary>
        /// POST请求测试(无参数)
        /// </summary>
        /// <returns></returns>
        [HttpPost("DefaultPost")]
        public void DefaultPost()
        {

        }

        /// <summary>
        /// POST请求测试(传参数需要添加[FromBody])
        /// </summary>
        /// <returns></returns>
        [HttpPost("DefaultPostPra")]
        public PostRequstTestDto DefaultPostPra([FromBody] PostRequstTestDto pra)
        {
            return pra;
        }

        /// <summary>
        /// POST请求测试(无参数)
        /// </summary>
        /// <returns></returns>
        [HttpGet("DefaultGet")]
        public void DefaultGet()
        {

        }

        /// <summary>
        /// Put请求测试
        /// </summary>
        /// <returns></returns>
        [HttpPut("DefaultPut")]
        public void DefaultPut()
        {

        }

        /// <summary>
        /// Delete请求测试
        /// </summary>
        /// <returns></returns>
        [HttpDelete("DefaultDelete")]
        public void DefaultDelete()
        {
          
        }
    }
}
